<template>
	<view  @click="jump()">
    <view class="mainimg" :style="'height:'+h*110 +'rpx;'">
       <image :src="good.mainImg" mode=""></image>
    </view>
    <view class="title">
      {{good.name}}
    </view>
    <view class="price row">
      <view class="newprice">
        ￥{{good.newPrice}}
      </view>
      <view class="oldprice">
       ￥{{good.oldPrice}} 
      </view>
    </view>
	</view>
</template>

<script>
	export default {
    props: {
      good: {
        type:Object,
      },
      h: {
        type:Number,
      }
    },
		data() {
			return {
				jump(){
          console.log(this.good.id);
        }
			};
		}
	}
</script>

<style lang="less">
  .mainimg{
    border: 3rpx solid #333333;
    image{
      width: 100%;
      height: 100%;
    }
  }
  .title{
    
  }
  .price{
    
    .newprice{
      font-weight: 600;
    }
    .oldprice{
      color: #808080;
      margin-left: auto;
    }
  }
</style>
